package com.twobu.twobuinsight.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
@Schema(description = "任务结果响应")
public class TaskOutcomeResponse {

    @Schema(description = "任务ID")
    private String taskId;

    @Schema(description = "任务状态")
    private String status;

    @Schema(description = "任务结果")
    private TaskOutcome outcome;

    @Data
    @Schema(description = "任务结果详情")
    public static class TaskOutcome {

        @Schema(description = "响应内容")
        private String response;

        @Schema(description = "元数据")
        private TaskMetadata metadata;
    }

    @Data
    @Schema(description = "任务元数据")
    public static class TaskMetadata {

        @Schema(description = "股票代码")
        private String stockCode;

        @Schema(description = "开始日期")
        private String fromDate;

        @Schema(description = "结束日期")
        private String toDate;

        @Schema(description = "公告列表")
        private List<Map<String, Object>> announcements;

        @Schema(description = "解析内容")
        private List<Map<String, Object>> parsedContents;
    }
}
